home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1997 August / Walnut Creek CDROM.7z / VOL_400 / 446_01 / DOC / DPBASICS / MV2 / POINT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-18  |  465 b   |  16 lines

  1. #ifndef Point_H_IS_INCLUDED
  2. #define Point_H_IS_INCLUDED
  3. #include <IOs.h>
  4. #include <math.h>
  5. #include <stdio.h>
  6. struct Point
  7. {
  8.   real x,y,z;
  9.   Point () { x=y=z=0; }                           // constructor without args
  10.   Point (const Point& p) { x=p.x; y=p.y; z=p.z; } // copy constructor
  11.   Point& operator = (const Point& p);
  12.   friend Is& operator >> (Is& is, Point& p)  { is>>p.x>>p.y>>p.z; return is; }
  13.   friend Os& operator << (Os& os, const Point& p);
  14. };
  15. #endif
  16.